import request from '@/utils/request'

// 查询知识库列表
export function listStash(query) {
  return request({
    url: '/system/stash/list',
    method: 'get',
    params: query
  })
}

// 查询知识库详细
export function getStash(knowledgeId) {
  return request({
    url: '/system/stash/' + knowledgeId,
    method: 'get'
  })
}

// 新增知识库
export function addStash(data) {
  return request({
    url: '/system/stash',
    method: 'post',
    data: data
  })
}

// 修改知识库
export function updateStash(data) {
  return request({
    url: '/system/stash',
    method: 'put',
    data: data
  })
}

// 删除知识库
export function delStash(knowledgeId) {
  return request({
    url: '/system/stash/' + knowledgeId,
    method: 'delete'
  })
}
